#include <stdio.h>

// 结构体数组本质，一维数组，只不过是一维数组中的每个成员又是结构体。

typedef struct _stu
{
    int num;
    char name[100];
    char sex;
    float score;
} Stu;

int main()
{
//    Stu s0,s1,s2,s3;
//    int arr[3][4] ={{1,2,3,4},{1,2,3,4},{1,2,3,4}};
    Stu s[4]={{1001,"tang",'f',99},{1002,"sun",'m',88},{1003},{}};
    for(int i = 0; i < sizeof (s)/sizeof (*s); i++)
    {
        printf("num   = %d\n",s[i].num);
        printf("name  = %s\n",s[i].name);
        printf("sex   = %c\n",s[i].sex);
        printf("score = %f\n",s[i].score);
        printf("----------------------\n");
    }

    return 0;
}
